﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.Text;

namespace Aluetjen.EmailService.Agent
{
    internal class BindingFactory : IBindingFactory
    {
        public Binding Create(string bindingName, string bindingConfig)
        {
            switch (bindingName)
            {
                case "BasicHttpBinding":
                    return new BasicHttpBinding(bindingConfig);
                case "NetMsmqBinding":
                    return new NetMsmqBinding(bindingConfig);
                default:
                    throw new InvalidOperationException("Binding not supported");
            }
        }
    }
}
